import { connect } from "react-redux";
import { getOne, addToCart } from "../actions";
import { Details } from "../components";

const mapStateToProps = state => {
  //4.将仓库里state转化为props，组件间数据传递只能通过props
  return {
    data: state.product.data,
    boo : state.login,

  };
};

export default connect(
  mapStateToProps,
  { getOne, addToCart }
)(Details);
